package com.prik.strategy.discount;

import java.math.BigDecimal;

/**
 * @author prik
 * @date 2019/7/18
 */
public class Test {

    public static void main(String[] args) {
        BigDecimal originalPrice = new BigDecimal(100);

        // 普通客户
        DiscountContext discountContext = new DiscountContext();
        BigDecimal price1 = discountContext.calDiscountPrice(originalPrice, 1);

        System.out.println("普通客户下单，原价：" + originalPrice + "元，应付款：" + price1 + "元");

        // vip客户
        BigDecimal price2 = discountContext.calDiscountPrice(originalPrice, 2);
        System.out.println("vip客户下单，原价：" + originalPrice + "元，应付款：" + price2 + "元");
        //
        // // 合作伙伴
        // BigDecimal price3 = discountContext.calDiscountPrice(originalPrice, 3);
        // System.out.println("合作伙伴下单，原价：" + originalPrice + "元，应付款：" + price3 + "元");
    }
}
